<extend name="Public:base" />

<block name="content">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em> 
            {$type}         
            </h3> 
        </div>
        
    </div>

    <div class="row margin-botton">
        <div class="col-sm-6 column">
            <div class="btn-group btn-group-md">           
                <button class="btn btn-primary" type="button" onclick="goUrl('{:U('addNode', array('level' => 1))}')"><em class="glyphicon glyphicon-plus-sign"></em> 添加应用(节点)</button>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="alert alert-warning" role="alert">
              <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
              <span class="sr-only">Note:</span>
              节点：应用(level:1)->控制器(level:2)->方法(level:3)
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <volist name="node" id="vo">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <div class="row">
                                <div class="col-xs-8">
                                    <h3 class="panel-title">{$vo.title}</h3>
                                </div>
                                <div class="col-xs-4 text-right">
                                    <a href="{:U('addNode', array('pid' => $vo['id'],'level' => 2))}" class="btn btn-xs btn-primary" title="添加"><i class="glyphicon glyphicon-plus-sign"></i> </a>      
                                    <a href="{:U('editNode', array('id' => $vo['id']))}" class="btn btn-xs btn-success" title="修改"><i class="glyphicon glyphicon-edit"></i></a>
                                    <empty name="vo['child']">
                                    <button type="button" onclick="del('{:U('delNode', array('id' => $vo['id']))}')" class="btn btn-xs btn-danger" title="删除"><i class="glyphicon glyphicon-remove"></i></button>
                                    </empty>
                                </div>
                        </div>
                        
                    </div>
                    <div class="panel-body xyh-panel-body">
                            <volist name="vo['child']" id="vo2">
                                <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <div class="row">
                                                <div class="col-xs-8">
                                                    <h3 class="panel-title">{$vo2.title}</h3>
                                                </div>
                                                <div class="col-xs-4 text-right">
                                                    <a href="{:U('addNode', array('pid' => $vo2['id'],'level' => 3))}" class="btn btn-xs btn-primary" title="添加"><i class="glyphicon glyphicon-plus-sign"></i> </a>      
                                                    <a href="{:U('editNode', array('id' => $vo2['id']))}" class="btn btn-xs btn-success" title="修改"><i class="glyphicon glyphicon-edit"></i></a>
                                                    <empty name="vo2['child']">
                                                    <button type="button" onclick="del('{:U('delNode', array('id' => $vo2['id']))}')" class="btn btn-xs btn-danger" title="删除"><i class="glyphicon glyphicon-remove"></i></button>
                                                    </empty>
                                                </div>
                                        </div>
                                        
                                    </div>
                                    <div class="panel-body">
                                            <volist name="vo2['child']" id="vo3"> 
                                                <div class="col-md-3 column">                   
                                                <span class="label <notempty name='vo3["status"]'>label-primary<else />label-default</notempty>">{$vo3.title}</span> 
                                                <a href="{:U('editNode', array('id' => $vo3['id']))}" class="label label-success"><i class="glyphicon glyphicon-edit"></i></a> 
                                                <a href="javascript:;" onclick="del('{:U('delNode', array('id' => $vo3['id']))}')"  class="label label-danger"><i class="glyphicon glyphicon-remove"></i></a>&nbsp; 
                                                </div>
                                            </volist>
                                    </div>
                                </div>                                
                            </volist>
                    </div>
                </div>
            
            </volist>
        </div>
    </div>

</block>